package com.wanxing.sellerapp

import android.app.Application
import android.util.Log
import com.blankj.utilcode.util.Utils
import com.jakewharton.processphoenix.ProcessPhoenix
import com.wanxing.sellerapp.config.model.AppConfigModel


class App : Application()
//    ,CactusCallback
{


    companion object{
        val configModel= AppConfigModel()
        var mid = 0

    }

    override fun onCreate() {

//        if (ProcessPhoenix.isPhoenixProcess(this)) {
//            return;
//        }
//        ProcessPhoenix.triggerRebirth(this)
        Thread.setDefaultUncaughtExceptionHandler { thread, throwable ->
            Log.e("App", "捕获异常",throwable)
            //遇到异常直接重启软件
//            if (!ProcessPhoenix.isPhoenixProcess(this)) {
//                ProcessPhoenix.triggerRebirth(this)
//            }
            ProcessPhoenix.triggerRebirth(this)
        }
        super.onCreate()
        Utils.init(this)
    }





}